3.1 \(\int \frac{\sin ^4(x)}{i+\cot (x)} \, dx\)

Optimal. Leaf size=78 \[ -\frac{5 i x}{16}-\frac{i}{8 (-\cot (x)+i)}+\frac{3 i}{16 (\cot (x)+i)}+\frac{1}{32 (-\cot (x)+i)^2}-\frac{3}{32 (\cot (x)+i)^2}-\frac{i}{24 (\cot (x)+i)^3} \]

[Out]

((-5*I)/16)*x + 1/(32*(I - Cot[x])^2) - (I/8)/(I - Cot[x]) - (I/24)/(I + Cot[x])^3 - 3/(32*(I + Cot[x])^2) + (
(3*I)/16)/(I + Cot[x])

________________________________________________________________________________________

Rubi [A]  time = 0.0639931, antiderivative size = 78, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.231, Rules used = {3487, 44, 203} \[ -\frac{5 i x}{16}-\frac{i}{8 (-\cot (x)+i)}+\frac{3 i}{16 (\cot (x)+i)}+\frac{1}{32 (-\cot (x)+i)^2}-\frac{3}{32 (\cot (x)+i)^2}-\frac{i}{24 (\cot (x)+i)^3} \]

Antiderivative was successfully verified.

[In]

Int[Sin[x]^4/(I + Cot[x]),x]

[Out]

((-5*I)/16)*x + 1/(32*(I - Cot[x])^2) - (I/8)/(I - Cot[x]) - (I/24)/(I + Cot[x])^3 - 3/(32*(I + Cot[x])^2) + (
(3*I)/16)/(I + Cot[x])

Rule 3487

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(a^(m - 2)*b
*f), Subst[Int[(a - x)^(m/2 - 1)*(a + x)^(n + m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x
] && EqQ[a^2 + b^2, 0] && IntegerQ[m/2]

Rule 44

Int[((a_) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*
x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[m + n + 2, 0])

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{\sin ^4(x)}{i+\cot (x)} \, dx &=\operatorname{Subst}\left (\int \frac{1}{(i-x)^3 (i+x)^4} \, dx,x,\cot (x)\right )\\ &=\operatorname{Subst}\left (\int \left (-\frac{1}{16 (-i+x)^3}-\frac{i}{8 (-i+x)^2}+\frac{i}{8 (i+x)^4}+\frac{3}{16 (i+x)^3}-\frac{3 i}{16 (i+x)^2}+\frac{5 i}{16 \left (1+x^2\right )}\right ) \, dx,x,\cot (x)\right )\\ &=\frac{1}{32 (i-\cot (x))^2}-\frac{i}{8 (i-\cot (x))}-\frac{i}{24 (i+\cot (x))^3}-\frac{3}{32 (i+\cot (x))^2}+\frac{3 i}{16 (i+\cot (x))}+\frac{5}{16} i \operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\cot (x)\right )\\ &=-\frac{5 i x}{16}+\frac{1}{32 (i-\cot (x))^2}-\frac{i}{8 (i-\cot (x))}-\frac{i}{24 (i+\cot (x))^3}-\frac{3}{32 (i+\cot (x))^2}+\frac{3 i}{16 (i+\cot (x))}\\ \end{align*}

Mathematica [A]  time = 0.121078, size = 51, normalized size = 0.65 \[ \frac{1}{192} (-15 \cos (2 x)+6 \cos (4 x)-i (60 x-45 \sin (2 x)+9 \sin (4 x)-\sin (6 x)-i \cos (6 x))) \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[x]^4/(I + Cot[x]),x]

[Out]

(-15*Cos[2*x] + 6*Cos[4*x] - I*(60*x - I*Cos[6*x] - 45*Sin[2*x] + 9*Sin[4*x] - Sin[6*x]))/192

________________________________________________________________________________________

Maple [A]  time = 0.068, size = 66, normalized size = 0.9 \begin{align*}{\frac{{\frac{i}{2}}}{\tan \left ( x \right ) -i}}-{\frac{{\frac{i}{24}}}{ \left ( \tan \left ( x \right ) -i \right ) ^{3}}}-{\frac{7}{32\, \left ( \tan \left ( x \right ) -i \right ) ^{2}}}-{\frac{5\,\ln \left ( \tan \left ( x \right ) -i \right ) }{32}}+{\frac{{\frac{3\,i}{16}}}{i+\tan \left ( x \right ) }}+{\frac{1}{32\, \left ( i+\tan \left ( x \right ) \right ) ^{2}}}+{\frac{5\,\ln \left ( i+\tan \left ( x \right ) \right ) }{32}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(x)^4/(I+cot(x)),x)

[Out]

1/2*I/(tan(x)-I)-1/24*I/(tan(x)-I)^3-7/32/(tan(x)-I)^2-5/32*ln(tan(x)-I)+3/16*I/(I+tan(x))+1/32/(I+tan(x))^2+5
/32*ln(I+tan(x))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)^4/(I+cot(x)),x, algorithm="maxima")

[Out]

Exception raised: RuntimeError

________________________________________________________________________________________

Fricas [A]  time = 1.63793, size = 224, normalized size = 2.87 \begin{align*} \frac{1}{384} \,{\left (-48 i \, x e^{\left (6 i \, x\right )} +{\left (-72 i \, x e^{\left (4 i \, x\right )} - 3 \, e^{\left (8 i \, x\right )} + 24 \, e^{\left (6 i \, x\right )} - 24 \, e^{\left (2 i \, x\right )} + 3\right )} e^{\left (2 i \, x\right )} + 6 \, e^{\left (8 i \, x\right )} - 36 \, e^{\left (4 i \, x\right )} + 12 \, e^{\left (2 i \, x\right )} - 2\right )} e^{\left (-6 i \, x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)^4/(I+cot(x)),x, algorithm="fricas")

[Out]

1/384*(-48*I*x*e^(6*I*x) + (-72*I*x*e^(4*I*x) - 3*e^(8*I*x) + 24*e^(6*I*x) - 24*e^(2*I*x) + 3)*e^(2*I*x) + 6*e
^(8*I*x) - 36*e^(4*I*x) + 12*e^(2*I*x) - 2)*e^(-6*I*x)

________________________________________________________________________________________

Sympy [A]  time = 0.434799, size = 54, normalized size = 0.69 \begin{align*} - \frac{5 i x}{16} - \frac{e^{4 i x}}{128} + \frac{5 e^{2 i x}}{64} - \frac{5 e^{- 2 i x}}{32} + \frac{5 e^{- 4 i x}}{128} - \frac{e^{- 6 i x}}{192} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)**4/(I+cot(x)),x)

[Out]

-5*I*x/16 - exp(4*I*x)/128 + 5*exp(2*I*x)/64 - 5*exp(-2*I*x)/32 + 5*exp(-4*I*x)/128 - exp(-6*I*x)/192

________________________________________________________________________________________

Giac [A]  time = 1.25479, size = 85, normalized size = 1.09 \begin{align*} \frac{15 \, \tan \left (x\right )^{2} + 18 i \, \tan \left (x\right ) - 5}{64 \,{\left (-i \, \tan \left (x\right ) + 1\right )}^{2}} + \frac{55 \, \tan \left (x\right )^{3} - 69 i \, \tan \left (x\right )^{2} - 15 \, \tan \left (x\right ) - 7 i}{192 \,{\left (\tan \left (x\right ) - i\right )}^{3}} + \frac{5}{32} \, \log \left (\tan \left (x\right ) + i\right ) - \frac{5}{32} \, \log \left (\tan \left (x\right ) - i\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)^4/(I+cot(x)),x, algorithm="giac")

[Out]

1/64*(15*tan(x)^2 + 18*I*tan(x) - 5)/(-I*tan(x) + 1)^2 + 1/192*(55*tan(x)^3 - 69*I*tan(x)^2 - 15*tan(x) - 7*I)
/(tan(x) - I)^3 + 5/32*log(tan(x) + I) - 5/32*log(tan(x) - I)